﻿--|--------------------------------------------------------------------------------
--| [GetGameList] - Insert Procedure Script for Game
--|--------------------------------------------------------------------------------
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id (N'[dbo].[GetGameList]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1) 
  DROP PROCEDURE [dbo].[GetGameList]
GO

CREATE PROCEDURE [dbo].[GetGameList]
(
	@TeamID int
)
AS
	SET NOCOUNT ON

	SELECT
		G.[ID],
		G.[TeamID],
		G.[Name],
		G.[Description],
		G.[CreationDate]
	FROM  [Game] G
	WHERE
		G.TeamID = @TeamID
	
GO
 